<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="copyright" content="Tencent"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
	<title>查看分店</title>
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/public.css" />
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/marketing.css" />
	<link href="<%=path%>/favicon.ico" rel="shortcut icon">
</head>
<body>
    <!-- <div class="k_search_box">
        <input type="text" placeholder="搜索" />
    </div> -->
   <div id="storeList" style="width:100%">
	   
   </div>

    <div class="s_popup">
        <div class="s_detailed_phone">
            <p id="mobile">0106728392</p>
            <div style="display：inline-block">
	            <a href="javascript:;" class="s_cancel_btn">取消</a>
	            <a href="javascript:call();">呼叫</a>
            </div>
            
        </div>
    </div>

	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
    <script>
        $('.s_annex em').click(function(){
            $('.s_popup').show();
            $('.s_detailed_phone').show();
        });
        $('.s_cancel_btn').click(function(){
            $('.s_popup').hide();
            $('.s_detailed_phone').hide();
        });
        $('.k_search_box input').focus(function(){
            $('.k_search_box input').css('background','#fff');
        });
    </script>
    <script type="text/javascript">
    var activity_id;
    var cid;
    var mobile;
    $(function(){
        activity_id=getQueryString("id");
        cid=getQueryString("cid");
    	activityStore(); 
    });
    
    function call(){
    	var href1="tel:"+mobile;
    	window.location.href =href1;
    }
    
    //获取活动门店信息
    function activityStore(){
    	var url = "<%=path%>/activityStore/ajaxListRelationActivityStore";
    	$.post(url,{
			"cid" : cid,
			"activityId" : activity_id,
    	},function(data){
    		var stores=data.data;
    		if(data.status == "200"){
    			var html='';
    	    	for(var i in stores){
    	    		html+='<a href="javascript:callPhone('+stores[i].phone+');"><dl class="s_annex click_phone" phone="'+stores[i].phone+'" style="width:100%">';
    	    		/* html+='<dt><img src="" /></dt>'; */
    	    		html+=' <dd class="click_phone" phone="'+stores[i].phone+'"><h3 class="click_phone" phone="'+stores[i].phone+'">'+stores[i].name+'</h3><p class="click_phone" phone="'+stores[i].phone+'">';
    	    		html+='<img class="click_phone" phone="'+stores[i].phone+'" src="<%=path%>/images/marketing/icon_addr.png" />'+stores[i].address+'<em><img phone="'+stores[i].phone+'" class="click_phone" src="<%=path%>/images/marketing/icon_phones.png" /></em>';
    	    		html+='</p></dd></dl></a>';
    	    	}
    	    	$("#storeList").html(html);
    		}else{
    		}
    	});
    }
    
    $(document).on('click', '.click_phone', function() {
    	 mobile=$(this).attr("phone");
    	 callPhone(mobile);
    });
    
    function callPhone(phone){
    	var href1="tel:"+mobile;
    	 window.location.href =href1;
    }
    
	//判断字符串是否为空
	function StringEmpty(content) {
		if (content == undefined || content == "" || content == null) {
			return false;
		} else {
			return true;
		}
	}
	   //获取url的参数
	function getQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
		var r = window.location.search.substr(1).match(reg);
		if (r != null)
			return unescape(r[2]);
		return null;
	}
    </script>
    
    
    
</body>
</html>